﻿using CK.Project.Core6.Application;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CK.Project.Core6.WebApi.Controllers
{
    /// <summary>
    /// 用户控制器
    /// </summary>
    [ApiController]
    [Route("api/[controller]/[Action]")]
    public class UserController : ControllerBase
    {
        private readonly IUserAppService userAppService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userAppService"></param>
        public UserController(IUserAppService userAppService)
        {
            this.userAppService = userAppService;
        }

        /// <summary>
        /// 查询用户列表
        /// </summary>
        /// <param name="userListDto"></param>
        /// <returns></returns>
        [HttpGet]
        public OUserListDto UserList([FromQuery]UserListDto userListDto)
        {
            return userAppService.UserList(userListDto);
        }
    }
}
